<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <meta name="author" content="Steven Watson">
  <link rel="shortcut icon" href="../../img/favicon.ico">
  <title>Video - Chez-SDL</title>
  <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>

  <link rel="stylesheet" href="../../css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../../css/theme_extra.css" type="text/css" />
  <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
  
  <script>
    // Current page data
    var mkdocs_page_name = "Video";
    var mkdocs_page_input_path = "ref/video.md";
    var mkdocs_page_url = null;
  </script>
  
  <script src="../../js/jquery-2.1.1.min.js" defer></script>
  <script src="../../js/modernizr-2.8.3.min.js" defer></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
  <script>hljs.initHighlightingOnLoad();</script> 
  
</head>

<body class="wy-body-for-nav" role="document">

  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
      <div class="wy-side-nav-search">
        <a href="../.." class="icon icon-home"> Chez-SDL</a>
        <div role="search">
  <form id ="rtd-search-form" class="wy-form" action="../../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" title="Type search term here" />
  </form>
</div>
      </div>

      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
	<ul class="current">
	  
          
            <li class="toctree-l1">
		
    <a class="" href="../..">Getting Started</a>
	    </li>
          
            <li class="toctree-l1">
		
    <a class="" href="../../sdl/">Overview of SDL 2</a>
	    </li>
          
            <li class="toctree-l1">
		
    <span class="caption-text">Tutorials</span>
    <ul class="subnav">
                <li class="">
                    
    <a class="" href="../../tuts/events/">Handling Events</a>
                </li>
                <li class="">
                    
    <a class="" href="../../tuts/renderer/">Renderer Basics</a>
                </li>
                <li class="">
                    
    <a class="" href="../../tuts/advanced-renderer/">Renderer Techniques</a>
                </li>
                <li class="">
                    
    <a class="" href="../../tuts/tetris/">Complete Example: Tetris</a>
                </li>
    </ul>
	    </li>
          
            <li class="toctree-l1">
		
    <span class="caption-text">Reference</span>
    <ul class="subnav">
                <li class="">
                    
    <a class="" href="../basics/">Basics</a>
                </li>
                <li class=" current">
                    
    <a class="current" href="./">Video</a>
    <ul class="subnav">
            
    <li class="toctree-l3"><a href="#display-window-management">Display &amp; Window Management</a></li>
    

    <li class="toctree-l3"><a href="#2d-accelerated-rendering">2D Accelerated Rendering</a></li>
    

    <li class="toctree-l3"><a href="#pixel-formats-conversion-routines">Pixel Formats &amp; Conversion Routines</a></li>
    

    <li class="toctree-l3"><a href="#rectangle-functions">Rectangle Functions</a></li>
    

    <li class="toctree-l3"><a href="#surface-creation-simple-drawing">Surface Creation &amp; Simple Drawing</a></li>
    

    <li class="toctree-l3"><a href="#clipboard-handling">Clipboard Handling</a></li>
    

    <li class="toctree-l3"><a href="#vulkan-support">Vulkan Support</a></li>
    

    </ul>
                </li>
                <li class="">
                    
    <a class="" href="../audio/">Audio</a>
                </li>
                <li class="">
                    
    <a class="" href="../events/">Events</a>
                </li>
                <li class="">
                    
    <a class="" href="../inputs/">Inputs</a>
                </li>
                <li class="">
                    
    <a class="" href="../force/">Force Feedback</a>
                </li>
                <li class="">
                    
    <a class="" href="../power/">Power Management</a>
                </li>
                <li class="">
                    
    <a class="" href="../timers/">Timers</a>
                </li>
                <li class="">
                    
    <a class="" href="../values/">Values</a>
                </li>
                <li class="">
                    
    <a class="" href="../data/">Data Objects</a>
                </li>
    </ul>
	    </li>
          
        </ul>
      </div>
      &nbsp;
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
        <a href="../..">Chez-SDL</a>
      </nav>

      
      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="breadcrumbs navigation">
  <ul class="wy-breadcrumbs">
    <li><a href="../..">Docs</a> &raquo;</li>
    
      
        
          <li>Reference &raquo;</li>
        
      
    
    <li>Video</li>
    <li class="wy-breadcrumbs-aside">
      
        <a href="https://github.com/steven741/chez-sdl/edit/master/docs/ref/video.md"
          class="icon icon-github"> Edit on GitHub</a>
      
    </li>
  </ul>
  <hr/>
</div>
          <div role="main">
            <div class="section">
              
                <h1 id="display-window-management">Display &amp; Window Management</h1>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-create-window</strong> <em>title</em> <em>x</em> <em>y</em> <em>w</em> <em>h</em> <em>flags...</em>) → SDL_Window</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>title</em></strong> : A string. Title of the window.</p>
<p><strong><em>x</em></strong> : An integer or <code>SDL-WINDOWPOS-UNDEFINED</code>. x-position of the window.</p>
<p><strong><em>y</em></strong> : An integer or <code>SDL-WINDOWPOS-UNDEFINED</code>. y-position of the window.</p>
<p><strong><em>w</em></strong> : An integer. The width of the viewport of the window.</p>
<p><strong><em>h</em></strong> : An integer. The height of the viewport of the window.</p>
<p><strong><em>flags</em></strong> : Zero or more <a href="../values/#window-flags">flags</a>.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A <code>SDL_Window</code> object.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_CreateWindow</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_CreateWindow">SDL Wiki</a></p>
<p><a href="https://wiki.libsdl.org/SDL_WindowFlags">SDL Wiki</a></p>
</blockquote>
<p>Examples:</p>
<pre><code class="scheme">(define *window*
  (sdl-create-window
    &quot;SDL2 on Scheme&quot;
    SDL-WINDOWPOS-UNDEFINED
    SDL-WINDOWPOS-UNDEFINED
    800
    600
    SDL-WINDOW-SHOWN
    SDL-WINDOW-OPENGL))
</code></pre>

<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-destroy-window</strong> <em>window</em>) → void</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>window</em></strong> : A <code>SDL_Window</code> object.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_DestroyWindow</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_DestroyWindow">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-disable-screen-saver</strong>) → void</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_DisableScreenSaver</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_DisableScreenSaver">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-enable-screen-saver</strong>) → void</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_EnableScreenSaver</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_EnableScreenSaver">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-gl-create-context</strong> <em>window</em>) → SDL_GLContext</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>window</em></strong> : A <code>SDL_Window</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A <code>SDL_GLContext</code> object.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GL_CreateContext</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GL_CreateContext">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-gl-delete-context</strong> <em>gl-context</em>) → void</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>gl-context</em></strong> : A <code>SDL_GLContext</code> object.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GL_DeleteContext</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GL_DeleteContext">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-gl-extension-supported?</strong> <em>extension</em>) → boolean</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>extension</em></strong> : A string. Name of the OpenGL extension.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>#t</code> if extension is supported otherwise <code>#f</code>.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GL_ExtensionSupported</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GL_ExtensionSupported">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-gl-get-attribute</strong> <em>attribute</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>attribute</em></strong> : A SDL OpenGL <a href="../values/#opengl-attributes">attribute</a>.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>The value of the attribute or a negative value.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GL_GetAttribute</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GL_GetAttribute">SDL Wiki</a></p>
<p><a href="https://wiki.libsdl.org/SDL_GLattr">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-gl-get-current-context</strong>) → SDL_GLContext</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>The window with an OpenGL context.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GL_GetCurrentWindow</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GL_GetCurrentWindow">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-gl-get-current-window</strong>) → SDL_Window</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>The current OpenGL context.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GL_GetCurrentContext</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GL_GetCurrentContext">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-gl-get-drawable-size</strong> <em>window</em>) → list</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>window</em></strong> : A SDL_Window.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>The list <code>(x y)</code> of the window.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GL_GetDrawableSize</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GL_GetDrawableSize">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-gl-get-drawable-size</strong> <em>window</em>) → list</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>window</em></strong> : A SDL_Window.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>The list <code>(x y)</code> of the window.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GL_GetDrawableSize</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GL_GetDrawableSize">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-gl-get-swap-interval</strong>) → number</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> if no v-sync; <code>1</code> if v-sync; <code>-1</code> if adaptive v-sync;</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GL_GetSwapInterval</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GL_GetSwapInterval">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-gl-make-current</strong> <em>window</em> <em>context</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>window</em></strong> : A SDL_Window.</p>
<p><strong><em>context</em></strong> : A SDL_GLContext.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>Result code. <code>0</code> for no failure.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GL_MakeCurrent</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GL_MakeCurrent">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-gl-reset-attributes!</strong>) → void</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GL_ResetAttributes</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GL_ResetAttributes">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-gl-set-attribute!</strong> <em>attribute</em> <em>value</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>attribute</em></strong> : A SDL OpenGL <a href="../values/#opengl-attributes">attribute</a>.</p>
<p><strong><em>value</em></strong> : A number to set the attribute.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>Result code. <code>0</code> if no failure.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GL_SetAttribute</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GL_SetAttribute">SDL Wiki</a></p>
<p><a href="https://wiki.libsdl.org/SDL_GLattr">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-gl-set-swap-interval!</strong> <em>interval</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>interval</em></strong> : <code>0</code> for no v-sync; <code>1</code> for v-sync; <code>-1</code> for adaptive v-sync;</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>Result code. <code>0</code> for no failure.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GL_SetSwapInterval</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GL_SetSwapInterval">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-gl-swap-window</strong> <em>window</em>) → void</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>window</em></strong> : A SDL_Window.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GL_SwapWindow</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GL_SwapWindow">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-current-video-driver</strong>) → string</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>Name of current video driver.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetCurrentVideoDriver</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetCurrentVideoDriver">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-display-bounds</strong> <em>display-index</em>) → sdl-rect | number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>display-index</em></strong> : A number. The index to query.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>An <code>sdl-rect</code> or an error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetDisplayBounds</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetDisplayBounds">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-display-dpi</strong> <em>display-index</em>) → list | number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>display-index</em></strong> : A number. The index to query.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A list <code>(ddpi hdpi vdpi)</code> or an error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetDisplayDPI</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetDisplayDPI">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-display-name</strong> <em>display-index</em>) → string</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>display-index</em></strong> : A number. The index to query.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>The display name.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetDisplayName</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetDisplayName">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-display-usable-bounds</strong> <em>display-index</em>) → sdl-rect | number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>display-index</em></strong> : A number. The index to query.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A <code>sdl-rect</code> or and error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetDisplayUsableBounds</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetDisplayUsableBounds">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-grabbed-window</strong>) → SDL_Window</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>The <code>SDL_Window</code> that's grabbed.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetGrabbedWindow</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetGrabbedWindow">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-num-display-modes</strong> <em>display-index</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>display-index</em></strong> : A number. The index to query.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>Number of display modes or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetNumDisplayModes</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetNumDisplayModes">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-num-video-displays</strong>) → number</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>Number of video modes or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetNumVideoDisplays</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetNumVideoDisplays">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-num-video-drivers</strong>) → number</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>Number of video modes or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetNumVideoDrivers</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetNumVideoDrivers">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-video-driver</strong> <em>index</em>) → string</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>index</em></strong> : A number. The index to query.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>The video driver name.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetVideoDriver</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetVideoDriver">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-window-surface</strong> <em>window</em>) → SDL_Surface</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>window</em></strong> : A <code>SDL_Window</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>The <code>SDL_Surface</code> of the window.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetWindowSurface</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetWindowSurface">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-show-window</strong> <em>window</em>) → void</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>window</em></strong> : A <code>SDL_Window</code>.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_ShowWindow</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_ShowWindow">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-update-window-surface</strong> <em>window</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>window</em></strong> : A <code>SDL_Window</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> if no failure.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_UpdateWindowSurface</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_UpdateWindowSurface">SDL Wiki</a></p>
</blockquote>
<h1 id="2d-accelerated-rendering">2D Accelerated Rendering</h1>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-compose-custom-blend-mode</strong> <em>src-color-factor</em> <em>dst-color-factor</em> <em>color-operation</em> <em>src-alpha-factor</em> <em>dst-alpha-factor</em> <em>alpha-operation</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>src-color-factor</em></strong> : A <a href="../values/#blend-factors">blend factor</a>.</p>
<p><strong><em>dst-color-factor</em></strong> : A <a href="../values/#blend-factors">blend factor</a>.</p>
<p><strong><em>color-operation</em></strong> : A <a href="../values/#blend-operations">blend operations</a>.</p>
<p><strong><em>src-alpha-factor</em></strong> : A <a href="../values/#blend-factors">blend factor</a>.</p>
<p><strong><em>dst-alpha-factor</em></strong> : A <a href="../values/#blend-factors">blend factor</a>.</p>
<p><strong><em>alpha-operation</em></strong> : A <a href="../values/#blend-operations">blend operations</a>.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A <a href="../values/#blend-modes">blend mode</a>.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_ComposeCustomBlendMode</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_ComposeCustomBlendMode">SDL Wiki</a></p>
<p><a href="https://wiki.libsdl.org/SDL_BlendFactor">SDL Wiki</a></p>
<p><a href="https://wiki.libsdl.org/SDL_BlendOperation">SDL Wiki</a></p>
<p><a href="https://wiki.libsdl.org/SDL_BlendMode">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-create-renderer</strong> <em>window</em> <em>index</em> <em>flags...</em>) → SDL_Renderer</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>window</em></strong> : A <code>SDL_Window</code> object.</p>
<p><strong><em>index</em></strong> : An integer. The index of the driver to use or, <code>-1</code> to use the first driver that supports the requested flags.</p>
<p><strong><em>flags</em></strong> : Zero or more <a href="../values/#renderer-flags">flags</a>.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A <code>SDL_Renderer</code> object.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_CreateRenderer</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_CreateRenderer">SDL Wiki</a></p>
<p><a href="https://wiki.libsdl.org/SDL_RendererFlags">SDL Wiki</a></p>
</blockquote>
<p>Examples:</p>
<pre><code class="scheme">(define *renderer*
  (sdl-create-renderer
    *window*
    -1
    SDL-RENDERER-ACCELERATED
    SDL-RENDERER-PRESENTVSYNC))
</code></pre>

<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-create-software-renderer</strong> <em>surface</em>) → SDL_Renderer</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>surface</em></strong> : A <code>SDL_Surface</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A <code>SDL_Renderer</code> object.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_CreateSoftwareRenderer</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_CreateSoftwareRenderer">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-create-texture</strong> <em>renderer</em> <em>format</em> <em>access</em> <em>w</em> <em>h</em>) → SDL_Texture</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
<p><strong><em>format</em></strong> : A pixel <a href="../values/#pixel-formats">format</a>.</p>
<p><strong><em>access</em></strong> : A texture <a href="../values/#texture-access">access</a>.</p>
<p><strong><em>x</em></strong> : An integer. The texture's width.</p>
<p><strong><em>y</em></strong> : An integer. The texture's height.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A <code>SDL_Texture</code> object.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_CreateTexture</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_CreateTexture">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-create-texture-from-surface</strong> <em>renderer</em> <em>surface</em>) → SDL_Texture</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
<p><strong><em>surface</em></strong> : A <code>SDL_Surface</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A <code>SDL_Texture</code> object.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_CreateTextureFromSurface</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_CreateTextureFromSurface">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-destroy-renderer</strong> <em>renderer</em>) → void</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_DestroyRenderer</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_DestroyRenderer">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-destroy-texture</strong> <em>texture</em>) → void</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>texture</em></strong> : A <code>SDL_Texture</code> object.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_DestroyTexture</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_DestroyTexture">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-gl-bind-texture</strong> <em>texture</em>) → list</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>texture</em></strong> : A <code>SDL_Texture</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A list <code>(width height)</code> of the texture or <code>'()</code> if operation failed.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GL_BindTexture</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GL_BindTexture">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-gl-unbind-texture</strong> <em>texture</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>texture</em></strong> : A <code>SDL_Texture</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> if the operation didn't fail.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GL_UnbindTexture</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GL_UnbindTexture">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-num-render-drivers</strong>) → number</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>The number of render drivers or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetNumRenderDrivers</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetNumRenderDrivers">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-render-draw-blend-mode</strong> <em>renderer</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A <a href="../values/#blend-modes">blend mode</a> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetRenderDrawBlendMode</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetRenderDrawBlendMode">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-render-draw-color</strong> <em>renderer</em>) → list</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A list <code>(r g b a)</code> or <code>'()</code> on failure.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetRenderDrawColor</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetRenderDrawColor">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-render-driver-info</strong> <em>index</em>) → sdl-renderer-info | number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>index</em></strong> : The index of the driver to query.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A <code>sdl-renderer-info</code> object or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetRenderDriverInfo</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetRenderDriverInfo">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-render-target</strong> <em>renderer</em>) → SDL_Texture</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A <code>SDL_Texture</code> object.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetRenderTarget</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetRenderTarget">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-renderer</strong> <em>window</em>) → SDL_Renderer</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>window</em></strong> : A <code>SDL_Window</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A <code>SDL_Renderer</code> object.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetRenderer</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetRenderer">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-renderer-info</strong> <em>renderer</em>) → sdl-renderer-info | number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A <code>sdl-renderer-info</code> object or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetRendererInfo</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetRendererInfo">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-renderer-output-size</strong> <em>renderer</em>) → list</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A list <code>(width height)</code> or <code>'()</code> on failure.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetRendererOutputSize</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetRendererOutputSize">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-texture-alpha-mod</strong> <em>texture</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>texture</em></strong> : A <code>SDL_Texture</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>The value of the alpha modifier or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetTextureAlphaMod</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetTextureAlphaMod">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-texture-blend-mode</strong> <em>texture</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>texture</em></strong> : A <code>SDL_Texture</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A <a href="../values/#blend-modes">blend mode</a> value or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetTextureBlendMode</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetTextureBlendMode">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-get-texture-color-mod</strong> <em>texture</em>) → list</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>texture</em></strong> : A <code>SDL_Texture</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A list of <code>(r g b)</code> or <code>'()</code> on error.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_GetTextureColorMod</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_GetTextureColorMod">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-clear</strong> <em>renderer</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderClear</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderClear">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-copy</strong> <em>renderer</em> <em>texture</em> <em>src-rect</em> <em>dst-rect</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
<p><strong><em>texture</em></strong> : A <code>SDL_Texture</code> object.</p>
<p><strong><em>src-rect</em></strong> : An <code>sdl-rect</code> object or <code>'()</code>.</p>
<p><strong><em>dst-rect</em></strong> : An <code>sdl-rect</code> object or <code>'()</code>.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderCopy</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderCopy">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-copy-ex</strong> <em>renderer</em> <em>texture</em> <em>src-rect</em> <em>dst-rect</em> <em>angle</em> <em>center-point</em> <em>flip</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
<p><strong><em>texture</em></strong> : A <code>SDL_Texture</code> object.</p>
<p><strong><em>src-rect</em></strong> : An <code>sdl-rect</code> object or <code>'()</code>.</p>
<p><strong><em>dst-rect</em></strong> : An <code>sdl-rect</code> object or <code>'()</code>.</p>
<p><strong><em>angle</em></strong> : A floating point. An angle in degrees clockwise.</p>
<p><strong><em>center-point</em></strong> : An <code>sdl-point</code> object or <code>'()</code>.</p>
<p><strong><em>flip</em></strong> : A <a href="../values/#renderer-flip">flip</a> value.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderCopyEx</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderCopyEx">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-draw-line</strong> <em>renderer</em> <em>x1</em> <em>y1</em> <em>x2</em> <em>y2</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
<p><strong><em>x1</em></strong> : x-coordinate of the first point.</p>
<p><strong><em>y1</em></strong> : y-coordinate of the first point.</p>
<p><strong><em>x2</em></strong> : x-coordinate of the second point.</p>
<p><strong><em>y2</em></strong> : y-coordinate of the second point.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderDrawLine</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderDrawLine">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-draw-lines</strong> <em>renderer</em> <em>points</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
<p><strong><em>points</em></strong> : A list of <code>sdl-point</code>.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderDrawLines</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderDrawLines">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-draw-point</strong> <em>renderer</em> <em>x</em> <em>y</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
<p><strong><em>x</em></strong> : x-coordinate of the point.</p>
<p><strong><em>y</em></strong> : y-coordinate of the point.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderDrawPoint</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderDrawPoint">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-draw-points</strong> <em>renderer</em> <em>points</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
<p><strong><em>points</em></strong> : A list of <code>sdl-point</code>.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderDrawPoints</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderDrawPoints">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-draw-rect</strong> <em>renderer</em> <em>rect</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
<p><strong><em>x</em></strong> : A <code>sdl-rect</code> or <code>'()</code>.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderDrawRect</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderDrawRect">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-draw-rects</strong> <em>renderer</em> <em>rects</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
<p><strong><em>x</em></strong> : A list of <code>sdl-rect</code>.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderDrawRects</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderDrawRects">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-fill-rect</strong> <em>renderer</em> <em>rect</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
<p><strong><em>x</em></strong> : A <code>sdl-rect</code> or <code>'()</code>.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderFillRect</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderFillRect">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-fill-rects</strong> <em>renderer</em> <em>rects</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
<p><strong><em>x</em></strong> : A list of <code>sdl-rect</code>.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderFillRects</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderFillRects">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-get-integer-scale</strong> <em>renderer</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>SDL-TRUE</code> or <code>SDL-FALSE</code>.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderGetIntegerScale</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderGetIntegerScale">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-get-logical-size</strong> <em>renderer</em>) → list</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A list <code>(width height)</code>.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderGetLogicalSize</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderGetLogicalSize">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-get-scale</strong> <em>renderer</em>) → list</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A list <code>(scale-x scale-y)</code>.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderGetScale</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderGetScale">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-get-viewport</strong> <em>renderer</em>) → sdl-rect</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p>A <code>sdl-rect</code> of the viewport.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderGetViewport</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderGetViewport">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-is-clip-enabled?</strong> <em>renderer</em>) → boolean</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>#t</code> or <code>#f</code>.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderIsClipEnabled</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderIsClipEnabled">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-present</strong> <em>renderer</em>) → void</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderPresent</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderPresent">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-set-clip!</strong> <em>renderer</em> <em>rect</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
<p><strong><em>rect</em></strong> : A <code>sdl-rect</code> object or <code>'()</code>.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderSetClipRect</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderSetClipRect">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-set-integer-scale!</strong> <em>renderer</em> <em>enable</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
<p><strong><em>enable</em></strong> : <code>SDL-TRUE</code> or <code>SDL-FALSE</code>.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderSetIntegerScale</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderSetIntegerScale">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-set-logical-size!</strong> <em>renderer</em> <em>w</em> <em>h</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
<p><strong><em>w</em></strong> : An integer. Width of logical resolution.</p>
<p><strong><em>h</em></strong> : An integer. Height of logical resolution.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderSetLogicalSize</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderSetLogicalSize">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-set-scale!</strong> <em>renderer</em> <em>scale-x</em> <em>scale-y</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
<p><strong><em>scale-x</em></strong> : An float. Scale with respect to the x-axis.</p>
<p><strong><em>scale-y</em></strong> : An float. Scale with respect to the y-axis.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderSetScale</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderSetScale">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-set-viewport!</strong> <em>renderer</em> <em>rect</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
<p><strong><em>rect</em></strong> : A <code>sdl-rect</code> object or <code>'()</code>.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderSetViewport</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderSetViewport">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-render-target-supported?</strong> <em>renderer</em>) → boolean</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>#t</code> or <code>#f</code>.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_RenderTargetSupported</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_RenderTargetSupported">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-set-render-draw-blend-mode!</strong> <em>renderer</em> <em>blend-mode</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
<p><strong><em>blend-mode</em></strong> : A <a href="../values/#blend-modes">blend mode</a>.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_SetRenderDrawBlendMode</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_SetRenderDrawBlendMode">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-set-render-draw-color!</strong> <em>renderer</em> <em>r</em> <em>g</em> <em>b</em> <em>a</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
<p><strong><em>r</em></strong> : An integer. Red value.</p>
<p><strong><em>g</em></strong> : An integer. Green value.</p>
<p><strong><em>b</em></strong> : An integer. Blue value.</p>
<p><strong><em>a</em></strong> : An integer. Alpha value.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_SetRenderDrawColor</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_SetRenderDrawColor">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-set-render-target!</strong> <em>renderer</em> <em>target</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>renderer</em></strong> : A <code>SDL_Renderer</code> object.</p>
<p><strong><em>target</em></strong> : A <code>SDL_Texture</code> object.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_SetRenderTarget</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_SetRenderTarget">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-set-texture-alpha-mod!</strong> <em>texture</em> <em>alpha</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>texture</em></strong> : A <code>SDL_texture</code> object.</p>
<p><strong><em>alpha</em></strong> : An integer. The texture's alpha modifier.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_SetTextureAlphaMod</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_SetTextureAlphaMod">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-set-texture-blend-mode!</strong> <em>texture</em> <em>blend-mode</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>texture</em></strong> : A <code>SDL_Texture</code> object.</p>
<p><strong><em>blend-mode</em></strong> : A <a href="../values/#blend-modes">blend mode</a>.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_SetTextureBlendMode</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_SetTextureBlendMode">SDL Wiki</a></p>
</blockquote>
<hr />
<p>Procedure:</p>
<blockquote>
<p>(<strong>sdl-set-texture-color-mod!</strong> <em>texture</em> <em>r</em> <em>g</em> <em>b</em>) → number</p>
</blockquote>
<p>Parameters:</p>
<blockquote>
<p><strong><em>texture</em></strong> : A <code>SDL_Texture</code> object.</p>
<p><strong><em>r</em></strong> : An integer. Red value.</p>
<p><strong><em>g</em></strong> : An integer. Green value.</p>
<p><strong><em>b</em></strong> : An integer. Blue value.</p>
</blockquote>
<p>Returns:</p>
<blockquote>
<p><code>0</code> or a negative number error code.</p>
</blockquote>
<p>C Function Name:</p>
<blockquote>
<p><code>SDL_SetTextureColorMod</code></p>
</blockquote>
<p>Other Docs:</p>
<blockquote>
<p><a href="https://wiki.libsdl.org/SDL_SetTextureColorMod">SDL Wiki</a></p>
</blockquote>
<h1 id="pixel-formats-conversion-routines">Pixel Formats &amp; Conversion Routines</h1>
<h1 id="rectangle-functions">Rectangle Functions</h1>
<h1 id="surface-creation-simple-drawing">Surface Creation &amp; Simple Drawing</h1>
<h1 id="clipboard-handling">Clipboard Handling</h1>
<h1 id="vulkan-support">Vulkan Support</h1>
              
            </div>
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="../audio/" class="btn btn-neutral float-right" title="Audio">Next <span class="icon icon-circle-arrow-right"></span></a>
      
      
        <a href="../basics/" class="btn btn-neutral" title="Basics"><span class="icon icon-circle-arrow-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <!-- Copyright etc -->
    
      <p><a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/80x15.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.</p>
    
  </div>

  Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
      
        </div>
      </div>

    </section>

  </div>

  <div class="rst-versions" role="note" style="cursor: pointer">
    <span class="rst-current-version" data-toggle="rst-current-version">
      
          <a href="https://github.com/steven741/chez-sdl/" class="fa fa-github" style="float: left; color: #fcfcfc"> GitHub</a>
      
      
        <span><a href="../basics/" style="color: #fcfcfc;">&laquo; Previous</a></span>
      
      
        <span style="margin-left: 15px"><a href="../audio/" style="color: #fcfcfc">Next &raquo;</a></span>
      
    </span>
</div>
    <script>var base_url = '../..';</script>
    <script src="../../js/theme.js" defer></script>
      <script src="../../search/main.js" defer></script>

</body>
</html>
